


var singleNumber = function(nums) {
    let arr = []
    for(let i = 0 ; i < nums.length ; i++){
        if( !arr.includes(nums[i])){
            arr.push(nums[i])
        }else{
            arr.splice(arr.indexOf(nums[i]),1)
        }
    }
    return arr
};

console.log(singleNumber([1,2,1,3,2,5]))